<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--时间控件mobiscroll-->
    <script src="jquery.js" type="text/javascript"></script>
    <script src="js/mobiscroll.core-2.5.2.js" type="text/javascript"></script>

    <script src="js/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>

    <link href="css/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
    <link href="css/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
    <script src="js/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
    <script src="js/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>

    <script>
        $(function(){
            selectDatetime();
        });
        //选择时间
        function selectDatetime() {
            var currYear = (new Date()).getFullYear();
            var opt = {};
            opt.date = { preset: 'date' };
            opt.datetime = { preset: 'datetime' };
            opt.time = { preset: 'time' };
            opt.default = {
                theme: 'sense-ui', //皮肤样式
                display: 'bottom', //显示方式
                mode: 'scroller', //日期选择模式
                lang: 'zh',
                startYear: currYear - 10, //开始年份
                endYear: currYear + 10, //结束年份


            };
            var optDateTime = $.extend(opt['datetime'], opt['default']);
            //var optTime = $.extend(opt['time'], opt['default']);
//            $(".ApptDate").mobiscroll(optDateTime).time(optDateTime);
//            $(".ApptDate").mobiscroll(optDateTime).datetime(optDateTime);
            $(".ApptDate").mobiscroll(optDateTime).date(optDateTime);
            $(".ApptDate2").mobiscroll(optDateTime).datetime(optDateTime);
        }
    </script>

</head>
<body>
<div>
    <input type="text"  class="ApptDate" style="width: 100%;height: 50px;border: 0px;"  />
    <input type="text"  class="ApptDate2" style="width: 100%;height: 50px;border: 0px;"  />
</div>
<button onclick="clickne();">
    点击
</button>

</body>
</html>
<script>
    function clickne(){

        $(".ApptDate").trigger("focus");
    }
</script>